import { createRouter, createWebHistory } from 'vue-router';


import Index from '../components/pages/Index/index.vue';
import Home from '../components/pages/Index/Home.vue';
import About from '../components/pages/Index/About.vue';
import LesserSixRens from '../components/pages/lesserSixRens/index.vue';
import LsrView from '../components/pages/lesserSixRens/view/index.vue';
import Demo from '../components/pages/Index/Demo.vue';
import LsrList from '../components/pages/lesserSixRens/list/index.vue';
 
// 创建路由实例
const router = createRouter({
  history: createWebHistory(),
  routes: [
    {
      path: '/',
      name: 'index',
      component: Index,
      children:[
        {
          path: '/home',
          name: 'Home',
          component: Home,
          children:[
    
          ]
        },
        {
          path: '/about',
          name: 'About',
          component: About,
        },
        {
          path: '/demo',
          name: 'Demo',
          component: Demo,
        },
        {
          path: '/lessersixrens',
          name: 'lessersixrens',
          component: LesserSixRens
          //嵌套路由需要在父页面内跳转
          // children:[
          //    {
          //      path: '/lessersixrens/view',
          //      name: 'lsrview',
          //     component: LsrView,
          //    }
         // ]
    
        },
      ]
    },
     
 
    //params 传参
    // {
    //   path: '/lessersixrens/view/:shichen/:one/:two/:divination',
    //   name: 'lsrview',
    //   component: LsrView,
    // },

     //query 和 state 传参
    {
      path: '/lessersixrens/view',
      name: 'lsrview',
      component: LsrView,
    },

    {
      path: '/lessersixrens/list',
      name: 'lsrlist',
      component: LsrList,
    },
    

   
 
    // 可以继续添加更多路由...
  ],
});

export default router;